#-*- coding: utf-8 -*-
'''
    Author: hkk
'''

from django import forms
from vmware.models import vmware_content
from django.contrib.auth.models import Group

class ContentFormEdit(forms.ModelForm):

    class Meta:
        model = vmware_content
        exclude = ('vm_ip','vm_hostname','vm_status')
        #fields = '__all__'
        description = '特殊要求请说明............'
        description1 = '例如：100G'
        description2 = '例如：何宽宽'
        description3 = '例如：用于部署mysql数据库'
        description4 = '开始使用时间，例如：2017-01-01'
        description5 = '到期时间，例如：2017-02-01'
        description6 = '1=97.201;2=97.202,3=97.203,4=97.204'


        widgets = {
            'vm_ower' : forms.TextInput(attrs={'class':'form-control','placeholder': description2}),
            'vm_system' : forms.Select(attrs={'class':'form-control'}),
            'vm_bit' : forms.Select(attrs={'class':'form-control'}),
            'vm_cpu' : forms.Select(attrs={'class':'form-control'}),
            'vm_mem' : forms.Select(attrs={'class':'form-control'}),
            'vm_disk' : forms.TextInput(attrs={'class':'form-control','placeholder': description1}),
            'vm_use' : forms.TextInput(attrs={'class':'form-control','placeholder': description3}),
            'vm_beizhu' : forms.TextInput(attrs={'class':'form-control','placeholder': description}),
            'vm_cluster' : forms.TextInput(attrs={'class':'form-control','placeholder': description6}),
            'vm_stime':forms.TextInput(attrs={'class':'form_datetime'}),
            'vm_endtime':forms.TextInput(attrs={'class':'form_datetime'}),


        }


class ContentFormApply(forms.ModelForm):

    class Meta:
        model = vmware_content
        exclude = ('vm_ip','vm_hostname','vm_status',)
        #fields = '__all__'
        description = '特殊要求请说明............'
        description1 = '例如：100G'
        description2 = '例如：何宽宽'
        description3 = '例如：用于部署mysql数据库'
        description4 = '开始使用时间，例如：2017-01-01'
        description5 = '到期时间，例如：2017-02-01'
        description6 = '1=97.201;2=97.202,3=97.203,4=97.204'


        widgets = {
            'vm_ip' : forms.TextInput(attrs={'class':'form-control'}),
            'vm_hostname' : forms.TextInput(attrs={'class':'form-control'}),
            'vm_ower' : forms.TextInput(attrs={'class':'form-control','placeholder': description2}),
            'vm_system' : forms.Select(attrs={'class':'form-control'}),
            'vm_bit' : forms.Select(attrs={'class':'form-control'}),
            'vm_cpu' : forms.Select(attrs={'class':'form-control'}),
            'vm_mem' : forms.Select(attrs={'class':'form-control'}),
            'vm_disk' : forms.TextInput(attrs={'class':'form-control','placeholder': description1}),
            'vm_use' : forms.TextInput(attrs={'class':'form-control','placeholder': description3}),
            'vm_status' : forms.Select(attrs={'class':'form-control'}),
            'vm_beizhu' : forms.TextInput(attrs={'class':'form-control','placeholder': description}),
            'vm_cluster' : forms.TextInput(attrs={'class':'form-control','placeholder': description6}),
            'vm_stime':forms.TextInput(attrs={'class':'form_datetime'}),
            'vm_endtime':forms.TextInput(attrs={'class':'form_datetime'}),
            'created_by' : forms.TextInput(attrs={'class':'form-control'}),

        }


class ContentForm(forms.ModelForm):

    class Meta:
        model = vmware_content
        #exclude = ('vm_ip','vm_hostname','vm_status',)
        fields = '__all__'
        description = '特殊要求请说明............'
        description1 = '例如：100G'
        description2 = '例如：何宽宽'
        description3 = '例如：用于部署mysql数据库'
        description4 = '开始使用时间，例如：2017-01-01'
        description5 = '到期时间，例如：2017-02-01'
        description6 = '1=97.201;2=97.202,3=97.203,4=97.204'


        widgets = {
            'vm_ip' : forms.TextInput(attrs={'class':'form-control'}),
            'vm_hostname' : forms.TextInput(attrs={'class':'form-control'}),
            'vm_ower' : forms.TextInput(attrs={'class':'form-control','placeholder': description2}),
            'vm_system' : forms.Select(attrs={'class':'form-control'}),
            'vm_bit' : forms.Select(attrs={'class':'form-control'}),
            'vm_cpu' : forms.Select(attrs={'class':'form-control'}),
            'vm_mem' : forms.Select(attrs={'class':'form-control'}),
            'vm_disk' : forms.TextInput(attrs={'class':'form-control','placeholder': description1}),
            'vm_use' : forms.TextInput(attrs={'class':'form-control','placeholder': description3}),
            'vm_status' : forms.Select(attrs={'class':'form-control'}),
            'vm_beizhu' : forms.TextInput(attrs={'class':'form-control','placeholder': description}),
            'vm_cluster' : forms.TextInput(attrs={'class':'form-control','placeholder': description6}),
            'vm_stime':forms.TextInput(attrs={'class':'form_datetime'}),
            'vm_endtime':forms.TextInput(attrs={'class':'form_datetime'}),
            'created_by' : forms.TextInput(attrs={'class':'form-control'}),


        }




